﻿using MVVM;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Themes.Controls
{
    /// <summary>
    /// 对话框ViewModel
    /// </summary>
    public class DialogViewModel : NotifyBaseModel
    {
        /// <summary>
        /// 是否显示对话框
        /// </summary>
        public Boolean ShowDialog
        {
            get
            {
                return this.GetValue<Boolean>();
            }
            set
            {
                this.SetValue(value);
            }
        }

        /// <summary>
        /// 标题
        /// </summary>
        public String Title
        {
            get
            {
                return this.GetValue<String>();
            }
            set
            {
                this.SetValue(value);
            }
        }

        /// <summary>
        /// 内容
        /// </summary>
        public Object Content
        {
            get
            {
                return this.GetValue<Object>();
            }
            set
            {
                this.SetValue(value);
            }
        }

        /// <summary>
        /// 显示
        /// </summary>
        public void Show()
        {
            this.ShowDialog = true;
        }

        /// <summary>
        /// 隐藏
        /// </summary>
        public void Hide()
        {
            this.ShowDialog = false;
        }
    }
}
